#pragma once

#include "AbstractLock.h"

class Lock_TPDLL : public AbstractLock
{
public:
	Lock_TPDLL();
	~Lock_TPDLL();
	
	bool isVaild();

	virtual Json::Value DealCommand(QString cmd,Json::Value &param);
	bool checkParam(QString cmd,Json::Value &param,QString &error);
	QString errorMessage(int r);
	
	int init(int lockType);
	int ReadCard(char *card_snr,char *room_no, char *checkin_time, char *checkout_time);
	int IssueCard(char *card_snr, char *room_no, char *checkin_time,char *checkout_time, int iflags);
	int CancelCard(char *card_snr);
};